
<%@ page import="edu.auctionmart.Auction" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'auction.label', default: 'Auction')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>

		<div id="list-auction" class="content scaffold-list" role="main">
			<h1><g:message code="default.list.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
						<th><g:message code="Auction Link" /></th>
											
						<th><g:message code="auction.seller.label" default="Seller" /></th>
					
						<th><g:message code="auction.item.label" default="Item" /></th>
					
						<g:sortableColumn property="auctionTitle" title="${message(code: 'auction.auctionTitle.label', default: 'Auction Title')}" />
					
						<g:sortableColumn property="startTime" title="${message(code: 'auction.startTime.label', default: 'Start Time')}" />
					
						<g:sortableColumn property="endTime" title="${message(code: 'auction.endTime.label', default: 'End Time')}" />
						
						<g:sortableColumn property="isEnded" title="${message(code: 'auction.status.label', default: 'Status')}" />
					
					</tr>
				</thead>
				<tbody>
				<g:each in="${auctionInstanceList}" status="i" var="auctionInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link controller="auction" action="show" id="${auctionInstance.id}">See Auction</g:link></td>
						
						<td>${fieldValue(bean: auctionInstance, field: "seller")}</td>
					
						<td>${fieldValue(bean: auctionInstance, field: "item")}</td>
					
						<td>${fieldValue(bean: auctionInstance, field: "auctionTitle")}</td>
					
						<td>${fieldValue(bean: auctionInstance, field: "formattedStartTime")}</td>
					
						<td>${fieldValue(bean: auctionInstance, field: "formattedEndTime")}</td>
						
						<td>${fieldValue(bean: auctionInstance, field: "status")}</td>
					
					</tr>
				</g:each>
				</tbody>
			</table>
		</div>
	</body>
</html>
